<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	template="/WEB-INF/templates/template.xhtml">
	<ui:define name="title">#{messages.provinciasTitulo}</ui:define>
	<ui:define name="content">
		<h:form id="form">
			<div id="form_box">
				<div id="form_left">
				</div>	
				<div class="clearer"></div>			
			</div>
			<div id="butons">
				<h:panelGrid columns="2" width="100%" columnClasses="buttons-search,buttons-create">
					<h:commandButton value="#{messages.search}" 
						action="#{provinciaBean.search}" />
	
					<h:commandButton value="#{messages.personaFisicaCreate}" 
						action="#{provinciaBean.showCreate}">
						<f:setPropertyActionListener value="#{facesContext.viewRoot.viewId}" 
							target="#{provinciaBean.persistReturnView}" />
					</h:commandButton>									
				</h:panelGrid>
				<h:panelGrid columns="1"/>
		
				<rich:dataTable keepSaved="true" id="richTable" var="record" 
					value="#{provinciaBean.dataModel}" rows="20"
					rendered="#{provinciaBean.searchActive}">
					
					<rich:column>
						<f:facet name="header">
							<h:outputText value="#{messages.provinciaPais}"/>						
						</f:facet>
						<h:outputText value="#{record.pais.name}"/>			
					</rich:column>
	
					<rich:column>
						<f:facet name="header">
							<h:outputText value="#{messages.provinciaNombre}"/>						
						</f:facet>
						<h:outputText value="#{record.name}"/>			
					</rich:column>
					
	 
	            	<f:facet name="footer">
	                	<rich:dataScroller id="scroller" />
		            </f:facet>
	            </rich:dataTable>
			</div>
		</h:form>
	</ui:define>	
</ui:composition>
